﻿using System.Web.Mvc;
using ECommerce.Web.ViewModels;
using ECommerce.Web.ViewQueries;

namespace ECommerce.Web.Controllers
{
    public class ProductController : BaseController
    {
        private readonly IProductShowViewQuery productShowViewQuery;

        public ProductController(IProductShowViewQuery productShowViewQuery)
        {
            this.productShowViewQuery = productShowViewQuery;
        }
        
        public ActionResult Show(int id)
        {
            ProductShowView view = this.productShowViewQuery.GetQuery(id);

            return View(view);
        }
    }
}
